
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.tss.util.*"%>
<%@page import="com.store.*"%>
<%@page import="java.util.*"%>
<%@page import="com.jedi.*"%>
<%@include file="../global_var.jsp"%>
<%@page import="java.text.*"%>
<%@include file="../check_login.jsp"%>
<%
User just_user = (User)session.getAttribute("LoginUser");
String power_enable_id = "10707";
if (!just_user.hasPower(power_enable_id)) {
	out.println(strNoPowerInfo); 
	return;
}

String path = request.getContextPath();
String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";


SevgradeMgr sevgradeMgr = new SevgradeMgr();
List list = null;
%>
<html>
	<head>
		<base href="<%=basePath%>">
		<meta http-equiv="Content-Type" content="text/html; charset=GBK">
		<title></title>
		<link href="style/main.css" rel="stylesheet" type="text/css">
		<script language="javascript" src="js/common.js"></script>
		<script language="javascript">
function clk_contract_show(id) {
	right_menu_clk("sevgrade_show.jsp?sgid=" + id);
}
function clk_chanage(url){
	location.href=url;

}
</script>
	</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
	<table width="80%" border="0" cellpadding="0" cellspacing="0" align="center">
  <tr>
	 <td >
		<form name="pageForm" method="post">
			<table width="100%" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="100" valign="top" align="center" style="padding-top:12px;padding-bottom:10px;">
								
					<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
					<tr bgcolor="#D7D7DB">
						<td height="24" style="padding-left:10px;" >
							

												</td>
												<td align="center" width="20%">
												 <span onclick="right_menu_clk('sevgrade_add.jsp');" style="cursor:hand;font-size:12px;text-de--ation: underline;">添加服务等级</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
											</td>
										</tr>
										<tr bgcolor="#FFFFFF">
											<td height="15" style="padding-left:10px;" colspan="5">
											</td>
										</tr>
									</table>
									<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF">
										<tr align="center" bgcolor="#858585">
											<td width="40%" height="24"><font color="#FFFFFF">服务等级编号</font></td>
											<td width="40%">
												<font color="#FFFFFF">服务等级名称</font>
											</td>
										
										<td width="20%"><font color="#FFFFFF">操作</font></td>
										</tr>
			<%String otherSQL = "";
	          
			
			String orderField = "sgid ASC ";
			int pageSize = 10;
			int pageno = 1;
			String page2 = request.getParameter("mgh");

			if (page2 == null || page2 == "") {
				pageno = 1;
			} else {
				pageno = Integer.parseInt(page2);
			}

			int pageNo = ParamUtils.getIntParameter(request, "page", pageno);
			String pageno1 = String.valueOf(pageNo);
			session.setAttribute("pageno1", pageno1);
			list = sevgradeMgr.get(otherSQL, orderField);
			int total = sevgradeMgr.getTotal();
			boolean b = (total % pageSize == 0);
			int pageCount = b ? (total / pageSize) : (total / pageSize + 1);
			if (pageNo > pageCount) {
				pageNo = pageCount;
			}
			if (list != null && list.size() > 0) {
				String bgColor[] = { "#EDEDF0", "#D7D7DB" };
				for(int i=0;i<list.size();i++) {
              		Sevgrade item = (Sevgrade)list.get(i);
              		
              		
              		
              	
              %>
					<tr align="center" bgcolor="<%=bgColor[i%2]%>" onMouseOver="this.style.background='#efefef'" onMouseOut="this.style.background='<%=bgColor[i%2]%>'">
						
											<td  height="24">
											<%=item.getSgid()%>
											</td>
											<td>
												<%=item.getSgname()%>
											</td>
										
											<td>
												<span onclick="clk_contract_show('<%=item.getSgid()%>');" style="cursor:hand;text-decoration: underline;">修改</span>
											</td>
										</tr>
										<%}%>
									</table>
									
									
									<%} else {%>
					
								<table width="95%" border="0" cellpadding="4" cellspacing="1" bgcolor="#FFFFFF">
									<tr>
										<td height="60" align="center">
											请选择条件查询信息!
										</td>
									</tr>
								</table>
								<%}%>
							</td>
						</tr>

				</table>
					</form>
				</td>
			</tr>
		</table>

	
	</body>
</html>
